upstream gunicorn-goworking {
  server 127.0.0.1:8000;
}

server {
  listen 80;
  listen [::]:80;
  server_name goworking.fabricadofuturo.com.br;
  return 301 http://goworking.fabricadofuturo.com.br$request_uri;
}

server {
  listen 80;
  listen [::]:80;
  server_name goworking.fabricadofuturo.com;
#  root /var/www/git/fabricadofuturo/goworking-mesas/;
#  index index.html;
#  charset utf-8;
  location /static {
    alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/web/static;
  }
  location /goworking/static {
    alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/goworking/static;
  }
  location / {
    proxy_pass http://gunicorn-goworking;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    client_max_body_size 5M;
   }
}

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  #ssl_protocols TLSv1.2; # nginx v1.10.3
  #ssl_prefer_server_ciphers on;
  #ssl_dhparam /etc/nginx/dhparam.pem;
  #ssl_ciphers EECDH+AESGCM:EDH+AESGCM;
  #ssl_ecdh_curve secp384r1;
  #ssl_session_timeout  10m;
  #ssl_session_cache shared:SSL:10m;
  #ssl_session_tickets off;
  #ssl_stapling on;
  #ssl_stapling_verify on;
  #resolver 208.67.220.220 208.67.222.222 valid=300s;
  #resolver_timeout 5s;
  #add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
  #add_header X-Frame-Options SAMEORIGIN;
  #add_header X-Content-Type-Options nosniff;
  #add_header X-XSS-Protection "1; mode=block";
  ssl_certificate /etc/letsencrypt/live/goworking.fabricadofuturo.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/goworking.fabricadofuturo.com/privkey.pem;
  #ssl_trusted_certificate /etc/letsencrypt/live/goworking.fabricadofuturo.com/chain.pem;
  server_name goworking.fabricadofuturo.com;
#  root /var/www/git/fabricadofuturo/goworking-mesas/;
#  index index.html;
#  charset utf-8;
  location /static {
    alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/web/static;
  }
  location /goworking/static {
    alias /var/www/git/fabricadofuturo/goworking-mesas/blueprints/goworking/static;
  }
  location / {
    proxy_pass http://gunicorn-goworking;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    client_max_body_size 5M;
   }
}

